package com.fccommunity.ui.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.fccommunity.R;
import com.fccommunity.base.BaseFragment;
import com.fccommunity.ui.AboutMeActivity;
import com.fccommunity.ui.CheckInActivity;
import com.fccommunity.ui.MyWalletActivity;
import com.fccommunity.ui.PersonalCenterActivity;

/**
 * Created by yiwei on 16/4/17.
 */
public class MineFragment extends BaseFragment {
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_mine, container, false);
        return view;
    }

    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        view.findViewById(R.id.gotoPersonCenter).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(PersonalCenterActivity.newIntent(getActivity()));
            }
        });
        view.findViewById(R.id.gotoCheckIn).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(CheckInActivity.newIntent(getActivity()));
            }
        });
        view.findViewById(R.id.gotoMyWallet).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(MyWalletActivity.newIntent(getActivity()));
            }
        });
        view.findViewById(R.id.gotoAboutMe).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(AboutMeActivity.newIntent(getActivity()));
            }
        });
    }

    @Override
    protected void initTitle() {
        titleBar.setTitle("我的");
    }

}
